@echo off
set num=0
setlocal enabledelayedexpansion

rem svn info -r HEAD | findstr "Revision:">temp.h 

svn info -r HEAD >temp.h 


for /f "tokens=2 delims=:" %%i in (temp.h) do ( 
	set /a num+=1

	if !num! equ 6 (
	echo #include "global.h" >svnversion.h
	echo const u32 svn_version =%%i; >>svnversion.h
	)
)
move svnversion.h ./Var

del temp.h